package com.liao.rabbitmq.listener;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class QueueListener {

    @RabbitListener(queues = "Study_Queue1")
    public void processMessage(String message){
        System.out.println("从Study_Queue1收到的信息："+message);
    }

    @RabbitListener(queues = "Study_Queue2",containerFactory = "myFactory")
    public void processMessage1(String message){
        System.out.println("从Study_Queue2收到的信息："+message);
    }
}
